<?php
/**
 * @author hungnq@younetco.com
 */
class Core_Model_DbTable_ContestPrizes extends YouNet_Db_Table
{
    const TABLE_NAME 			= 'contest_prizes';
    protected $_name            = self::TABLE_NAME;
    protected $_rowClass        = 'Core_Model_ContestPrize';
	
	protected  static $_instance;
	
	/**
	 * @author hungnq
	 * @return Core_Model_DbTable_ContestPrizes
	 */
	public static function getInstance()
	{
		if(is_null(self::$_instance))
		{
			self::$_instance = new self();
		}
		return self::$_instance;
	}
	
	/**
	 *
	 * @param varchar(20) $id_contest
	 * @return Zend_Db_Rowset
	 */
	public function getContestPrizeList($id_contest)
	{
		$query = $this->select()
						->where('id_contest=?', $id_contest)
						->order('z_order asc');
		return $this->fetchAll($query);
	}
	
}
